package com.tjetc.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;
@Document(indexName = "chathistory")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class ChatHistory {
    @Id
    @Field(type = FieldType.Integer,store = true, index = true)
    private Integer id;
    @Field(type = FieldType.Integer,store = true, index = true)
    private Integer senderId;
    @Field(type = FieldType.Integer,store = true, index = true)
    private Integer receiverId;
    @Field(type = FieldType.Text,store = true, index = true)
    private String content;
    @Field(type = FieldType.Text,store = true, index = true)
    private String type;
    @Field(type = FieldType.Date,store = true, index = true)
    private Date date;
    @Field(type = FieldType.Boolean,store = true, index = true)
    private Boolean isRead;



    private Integer status;
    private String senderType;



}